
#数据类相当于是c语言的结构体

from dataclasses import dataclass #python.3.7内置

@dataclass #装饰类后，默认实现__repr__方法和__eq__方法等等
class Team:
    name: str
    age: int #可以设置默认值age: int=0


manu = Team('Manu',144)
other_manu = Team('Manu',144)
liver = Team('Liver',132)

print(manu, liver)
#Team(name='Manu', age=144) Team(name='Liver', age=132)

print(manu == other_manu)
#True
        
